package com.example.jiaopin.Service;
import com.example.jiaopin.Mapper.UserMapper;
import com.example.jiaopin.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public User getUserById(Integer userID) {
        return userMapper.getUserById(userID);
    }

    public void insertUser(User user) {
        userMapper.insertUser(user);
    }

    public void updateUser(User user) {
        userMapper.updateUser(user);
    }

    public void deleteUser(Integer userID) {
        userMapper.deleteUser(userID);
    }
}